package com.hqyj.lls.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class MhSelect extends UserPage{
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date start;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date end;
    private Integer userId;
    private String name; //昵称
    private String sex;
    private String address; //地址
    private String phone;
    private String email;
    private String username;
    private String password;
    private Integer deleted; //逻辑删除
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date joinDate;
    private String rname;

    public MhSelect() {
    }

    public MhSelect(Date start, Date end, Integer userId, String name, String sex, String address, String phone, String email, String username, String password, Integer deleted, Date joinDate, String rname, Date get) {
        this.start = start;
        this.end = end;
        this.userId = userId;
        this.name = name;
        this.sex = sex;
        this.address = address;
        this.phone = phone;
        this.email = email;
        this.username = username;
        this.password = password;
        this.deleted = deleted;
        this.joinDate = joinDate;
        this.rname = rname;
    }

    public String getRname() {
        return rname;
    }

    public void setRname(String rname) {
        this.rname = rname;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    //转换为JSON
    /*public String getJoinDate() {
        return DateUtils.getDateJSON(joinDate);
    }*/
    @JsonFormat(pattern = "yyy-MM-dd")
    public Date getJoinDate(){
        return joinDate;
    }
    public void setJoinDate(Date joinDate) {
        this.joinDate = joinDate;
    }

    @JsonFormat(pattern = "yyy-MM-dd")
    public Date getStart() {
        return start;
    }

    public void setStart(Date start) {
        this.start = start;
    }

    @JsonFormat(pattern = "yyy-MM-dd")
    public Date getEnd() {
        return end;
    }

    public void setEnd(Date end) {
        this.end = end;
    }

    @Override
    public String toString() {
        return "MhSelect{" +
                "start=" + start +
                ", end=" + end +
                ", userId=" + userId +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", address='" + address + '\'' +
                ", phone='" + phone + '\'' +
                ", email='" + email + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", deleted=" + deleted +
                ", joinDate=" + joinDate +
                ", rname='" + rname + '\'' +
                '}';
    }
}
